package com.gtw.command;

/**
 * 调用者,接收到命令,并执行命令
 */
public class Invoker {
    private Command command;

    //接受命令
    public void setCommand(Command command) {
        this.command = command;
    }

    //让命令去执行
    public void action(){
        this.command.execute();
    }

}
